home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3baudiojob.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  2.3 KB  |  108 lines

  1. /* 
  2.  *
  3.  * $Id: k3baudiojob.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16.  
  17. #ifndef K3BAUDIOJOB_H
  18. #define K3BAUDIOJOB_H
  19.  
  20. #include <k3bjob.h>
  21.  
  22.  
  23. class K3bAudioDoc;
  24. class K3bAudioImager;
  25. class QFile;
  26. class QDataStream;
  27. class K3bAbstractWriter;
  28. class KTempFile;
  29. class K3bCdrecordWriter;
  30. class K3bAudioNormalizeJob;
  31. class K3bAudioJobTempData;
  32. class K3bDevice::Device;
  33. class K3bAudioMaxSpeedJob;
  34.  
  35. /**
  36.   *@author Sebastian Trueg
  37.   */
  38. class K3bAudioJob : public K3bBurnJob
  39. {
  40.   Q_OBJECT
  41.     
  42.  public:
  43.   K3bAudioJob( K3bAudioDoc*, K3bJobHandler*, QObject* parent = 0 );
  44.   ~K3bAudioJob();
  45.     
  46.   K3bDoc* doc() const;
  47.   K3bDevice::Device* writer() const;
  48.  
  49.   QString jobDescription() const;
  50.   QString jobDetails() const;
  51.         
  52.  public slots:
  53.   void cancel();
  54.   void start();
  55.  
  56.  protected slots:
  57.   // writer slots
  58.   void slotWriterFinished( bool success );
  59.   void slotWriterNextTrack(int, int);
  60.   void slotWriterJobPercent(int);
  61.  
  62.   // audiodecoder slots
  63.   void slotAudioDecoderFinished( bool );
  64.   void slotAudioDecoderNextTrack( int, int );
  65.   void slotAudioDecoderPercent(int);
  66.   void slotAudioDecoderSubPercent( int );
  67.  
  68.   // normalizing slots
  69.   void slotNormalizeJobFinished( bool );
  70.   void slotNormalizeProgress( int );
  71.   void slotNormalizeSubProgress( int );
  72.  
  73.   // max speed
  74.   void slotMaxSpeedJobFinished( bool );
  75.  
  76.  private:
  77.   bool prepareWriter();
  78.   bool startWriting();
  79.   void cleanupAfterError();
  80.   void removeBufferFiles();
  81.   void normalizeFiles();
  82.   bool writeTocFile();
  83.   bool writeInfFiles();
  84.   bool checkAudioSources();
  85.  
  86.   K3bAudioDoc* m_doc;
  87.   K3bAudioImager* m_audioImager;
  88.   K3bAbstractWriter* m_writer;
  89.   K3bAudioNormalizeJob* m_normalizeJob;
  90.   K3bAudioJobTempData* m_tempData;
  91.   K3bAudioMaxSpeedJob* m_maxSpeedJob;
  92.  
  93.   KTempFile* m_tocFile;
  94.  
  95.   bool m_canceled;
  96.   bool m_errorOccuredAndAlreadyReported;
  97.  
  98.   bool m_written;
  99.  
  100.   int m_usedWritingApp;
  101.   int m_usedWritingMode;
  102.  
  103.   class Private;
  104.   Private* d;
  105. };
  106.  
  107. #endif
  108.